package 栈的数组实现;

public class Test {
    public static void main(String[] args) {
        Stack2<Integer> stack2 = new Stack2<>(3);
        stack2.push(1);
        stack2.push(2);
        stack2.push(3);
        stack2.push(4);
        System.out.println(stack2.peek());
        System.out.println();
        stack2.pop();
        for (Integer i : stack2) {
            System.out.println(i);
        }
    }
}
